import re
import time
import uuid

import requests

# url_page = 'https://m.enterdesk.com/bizhi/'
# res = requests.get(url=url_page)
# print(res.text)
# urls = re.findall(r'https://up.enterdesk.com/edpic_360_360.*?\.jpg', res.text)
#
# for url in urls:
#     res = requests.get(url=url)
#     time.sleep(2)
#     content = res.content
#     name = str(uuid.uuid1()) + ".jpg"
#     with open(name, 'wb')as f:
#         print('正在下载%s' % name)
#         f.write(content)

# # 发送请求
url = src="https://up.enterdesk.com/edpic/fe/9c/8c/fe9c8ccc5378a8437c0f57fff8504462.jpg"
res = requests.get(url=url)
# 将响应数据转化为二进制流数据
content = res.content
# 将二进制数据流数据写入文件
with open('./8.jpg', 'wb') as f:
    f.write(content)
